package top.xiaoshuaila.searescue.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import top.xiaoshuaila.searescue.pojo.Member;
import top.xiaoshuaila.searescue.service.DataDeal;
import top.xiaoshuaila.searescue.service.Testservice;

@Controller
public class ttest {
    @Autowired
    private Testservice testservice;
    @Autowired
    private DataDeal dataDeal;
    @RequestMapping("/ttest")
    @ResponseBody
    public boolean add( Member member) {
        try {
            testservice.add(member);
            return true;
        }catch (Exception e){
            return false;
        }
    }
    @RequestMapping("/test")
    public void test() {
        dataDeal.STHStop();
    }
}
